package fyp.spedmew.connector;

import android.os.AsyncTask;
import android.util.Log;

import java.io.IOException;

import fyp.spedmew.backend.entity.userEndpoint.model.User;


/**
 * Created by Andy on 22/12/2014.
 */
public class UserFindByPhoneATask extends AsyncTask<String, Void, User> {
    private static final String TAG = new Object(){}.getClass().getCanonicalName();

    @Override
    protected User doInBackground(String... params) {
        User result = null;
        try {
            result = ApiService.getUserEndpoint().findByPhone(params[0]).execute();
        } catch (IOException e) {
            Log.e(TAG, Log.getStackTraceString(e));
        }
        return result;
    }
}
